#pragma once
#include <QStyledItemDelegate>
#include <QVector>

class KeySearchWidget;
class DefaultItemDelegate : public QStyledItemDelegate
{
public:
	DefaultItemDelegate(KeySearchWidget* w);

	// painting
    void paint(QPainter *painter,
               const QStyleOptionViewItem &option, const QModelIndex &index) const override;
    QSize sizeHint(const QStyleOptionViewItem &option,
                   const QModelIndex &index) const override;

    void setColumnWidth(const QVector<int>& widths) { m_widths = widths; }

private:
    KeySearchWidget* m_host = nullptr;
    QVector<int>    m_widths;
};


